package o;

import android.annotation.TargetApi;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.os.Build.VERSION;
import android.util.StateSet;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import androidx.annotation.RestrictTo.d;

@RestrictTo({d.LIBRARY_GROUP})
public class asl {
    private static final int[] ʻ = new int[]{16842913, 16843623};
    private static final int[] ʼ = new int[]{16842913, 16842908};
    private static final int[] ʽ = new int[]{16842913};
    private static final int[] ˊ = new int[]{16842919};
    public static final boolean ˋ = (VERSION.SDK_INT >= 21);
    private static final int[] ˎ = new int[]{16842908};
    private static final int[] ˏ = new int[]{16843623};
    private static final int[] ॱ = new int[]{16843623, 16842908};
    private static final int[] ॱॱ = new int[]{16842913, 16843623, 16842908};
    private static final int[] ᐝ = new int[]{16842913, 16842919};

    @NonNull
    public static ColorStateList ˎ(@Nullable ColorStateList colorStateList) {
        if (ˋ) {
            r1 = new int[2][];
            int[] iArr = new int[]{ʽ, ॱ(colorStateList, ᐝ)};
            r1[1] = StateSet.NOTHING;
            iArr[1] = ॱ(colorStateList, ˊ);
            return new ColorStateList(r1, iArr);
        }
        r1 = new int[10][];
        iArr = new int[]{ᐝ, ॱ(colorStateList, ᐝ), ॱॱ, ॱ(colorStateList, ॱॱ), ʼ, ॱ(colorStateList, ʼ), ʻ, ॱ(colorStateList, ʻ), ʽ, 0};
        r1[5] = ˊ;
        iArr[5] = ॱ(colorStateList, ˊ);
        r1[6] = ॱ;
        iArr[6] = ॱ(colorStateList, ॱ);
        r1[7] = ˎ;
        iArr[7] = ॱ(colorStateList, ˎ);
        r1[8] = ˏ;
        iArr[8] = ॱ(colorStateList, ˏ);
        r1[9] = StateSet.NOTHING;
        iArr[9] = 0;
        return new ColorStateList(r1, iArr);
    }

    @ColorInt
    private static int ॱ(@Nullable ColorStateList colorStateList, int[] iArr) {
        int colorForState;
        if (colorStateList != null) {
            colorForState = colorStateList.getColorForState(iArr, colorStateList.getDefaultColor());
        } else {
            colorForState = 0;
        }
        return ˋ ? ˎ(colorForState) : colorForState;
    }

    @TargetApi(21)
    @ColorInt
    private static int ˎ(@ColorInt int i) {
        return fu.ˋ(i, Math.min(Color.alpha(i) * 2, 255));
    }
}
